<template>
  <div class="store-home-container" v-loading="boo.loading">
    <div class="home-content">
      <div class="content-label flex-normal">
        <span class="label-txt">今日数据</span>
      </div>
      <div class="store-main clearfix">
        <div class="store-item flex-column fl">
          <span class="item-label">今日下单（笔）</span>
          <span class="item-val">{{baseData['intradayOrderCount'] || '0'}}</span>
        </div>
        <div class="store-item flex-column fl">
          <span class="item-label">今日下单（金额）</span>
          <span class="item-val">{{baseData['intradayOrderMoney'] || '0.00'}}</span>
        </div>
        <div class="store-item flex-column fl">
          <span class="item-label">今日核销（笔）</span>
          <span class="item-val">{{baseData['intradayVerificationCount'] || '0'}}</span>
        </div>
        <div class="store-item flex-column fl">
          <span class="item-label">今日核销（金额）</span>
          <span class="item-val">{{baseData['intradayVerificationMoney'] || '0.00'}}</span>
        </div>
      </div>
      <div class="store-main clearfix">
        <div class="store-item flex-column fl">
          <span class="item-label">今日平台收益</span>
          <span class="item-val">{{baseData['intradayEarningsMoney'] || '0.00'}}</span>
        </div>
        <div class="store-item flex-column fl">
          <span class="item-label">今日结算（金额）</span>
          <span class="item-val">{{baseData['intradaySettleAccountsOrderMoney'] || '0.00'}}</span>
        </div>
        <div class="store-item flex-column fl">
          <span class="item-label">今日结算（笔）</span>
          <span class="item-val">{{baseData['intradaySettleAccountsOrderCount'] || '0'}}</span>
        </div>
        <div class="store-item flex-column fl">
          <span class="item-label">今日结算商户</span>
          <span class="item-val">{{baseData['intradaySettleAccountsShopCount'] || '0'}}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import {getHome} from '@/api/home/index'
export default {
  data() {
    return {
      boo: {
        loading: false,
      },
      baseData: {},
    };
  },
  mounted(){
    let _self = this
    _self.queryAdminHome()
  },
  methods: {
    queryAdminHome(){
      let _self = this
      _self.boo.loading = true
      getHome().then(res => {
        _self.baseData = res.data
      }).finally(() => _self.boo.loading = false)
    }
  },
};
</script>

<style scoped lang="scss">
.store-home-container {
  margin-top: vh(10);
  .home-content{
    margin-top: vh(10);
    padding: 0 vw(30);
    .content-label{
      height: vh(54);
      margin-bottom: vh(30);
      .label-txt{
        color: #444;
        font-size: vh(20);
      }
    }
    .store-main{
      margin-bottom: vh(40);
      .store-item{
        width: vw(260);
        .item-label{
          font-size: vh(13);
          font-weight: 500;
          color: #666;
          margin-bottom: vh(10);
        }
        .item-val{
          font-size: vh(50);
          font-weight: bold;
          color: #333;
        }
      }
    }
  }
}
</style>

